package com.atguigu.lease.web.api.config;

import com.atguigu.lease.web.api.interceptor.StgyApiAuthInpterceptor;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class StgyWebMvcConfig implements WebMvcConfigurer {
    @Resource
    StgyApiAuthInpterceptor stgyApiAuthInpterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(stgyApiAuthInpterceptor)
                .addPathPatterns("/app/**")
                .excludePathPatterns("/app/login/**");

    }
}
